package Logica.Core.Producto;

import Logica.Core.Depositos.Lote;
import Logica.Core.Personal.Insumo;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToOne;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Luciano
 */
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class Producto implements Serializable{

    @Id
    private int id;
    @Basic(optional = false)
    private double peso;
    @OneToOne
    private Lote miLote;
    @ManyToMany
    private List<Insumo> misInsumos;

    public Producto() {
    }

    public Producto(int id, double peso, Lote miLote, List<Insumo> misInsumos) {
        this.id = id;
        this.peso = peso;
        this.miLote = miLote;
        this.misInsumos = misInsumos;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getPeso() {
        return peso;
    }

    public void setPeso(double peso) {
        this.peso = peso;
    }

    public Lote getMiLote() {
        return miLote;
    }

    public void setMiLote(Lote miLote) {
        this.miLote = miLote;
    }

    public List<Insumo> getMisInsumos() {
        return misInsumos;
    }

    public void setMisInsumos(List<Insumo> misInsumos) {
        this.misInsumos = misInsumos;
    }

    
}
